package com.controller;

import com.dto.LoginRequest;
import com.dto.LoginResponse;
import com.service.AuthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/auth")
public class AuthController {
    
    @Autowired
    private AuthService authService;
    
    /**
     * 处理用户登录请求
     * @param loginRequest 登录请求信息
     * @return 登录响应结果
     */
    @PostMapping("/login")
    public LoginResponse login(@RequestBody LoginRequest loginRequest) {
        return authService.login(loginRequest);
    }
}